package com.ruoyi.teaching.domain.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

/**
 * @author Mouyiheng
 */
@Document(indexName = "multi_param_data")
public class MultiParamDto {
    @Id
    @Field(type = FieldType.Keyword)
    private String id;
    @Field(type = FieldType.Object)
    private TeachingTraceData teachingTraceData;
    @Field(type = FieldType.Object)
    private SysTrackData sysTrackData;
    @Field(type = FieldType.Object)
    private AcademyTrackingData academyTrackingData;
    public static class TeachingTraceData{
        /** 主键id */
        @Field(type = FieldType.Keyword)
        private Long id;

        /** 班级 */
        @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
        private String className;

        /** 学生 */
        @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
        private String studentName;

        /** 跟踪次数 */
        @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
        private Long traceTimes;

        /** 跟踪老师 */
        @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
        private String teacherName;

        /** 班级id */
        @Field(type = FieldType.Keyword)
        private Long classId;

        /** 学生id */
        @Field(type = FieldType.Keyword)
        private Long studentId;

        /** 老师id */
        @Field(type = FieldType.Keyword)
        private Long teacherId;

        /** 发生时间 */
        @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
        @JsonFormat(pattern = "yyyy-MM-dd")
        private Date trackDate;

        @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
        private String trackRemark;

        public Long getId() {
            return id;
        }

        public void setId(Long id) {
            this.id = id;
        }

        public String getClassName() {
            return className;
        }

        public void setClassName(String className) {
            this.className = className;
        }

        public String getStudentName() {
            return studentName;
        }

        public void setStudentName(String studentName) {
            this.studentName = studentName;
        }

        public Long getTraceTimes() {
            return traceTimes;
        }

        public void setTraceTimes(Long traceTimes) {
            this.traceTimes = traceTimes;
        }

        public String getTeacherName() {
            return teacherName;
        }

        public void setTeacherName(String teacherName) {
            this.teacherName = teacherName;
        }

        public Long getClassId() {
            return classId;
        }

        public void setClassId(Long classId) {
            this.classId = classId;
        }

        public Long getStudentId() {
            return studentId;
        }

        public void setStudentId(Long studentId) {
            this.studentId = studentId;
        }

        public Long getTeacherId() {
            return teacherId;
        }

        public void setTeacherId(Long teacherId) {
            this.teacherId = teacherId;
        }

        public Date getTrackDate() {
            return trackDate;
        }

        public void setTrackDate(Date trackDate) {
            this.trackDate = trackDate;
        }

        public String getTrackRemark() {
            return trackRemark;
        }

        public void setTrackRemark(String trackRemark) {
            this.trackRemark = trackRemark;
        }

        public TeachingTraceData() {
        }

        public TeachingTraceData(Long id, String className, String studentName, Long traceTimes, String teacherName, Long classId, Long studentId, Long teacherId, Date trackDate, String trackRemark) {
            this.id = id;
            this.className = className;
            this.studentName = studentName;
            this.traceTimes = traceTimes;
            this.teacherName = teacherName;
            this.classId = classId;
            this.studentId = studentId;
            this.teacherId = teacherId;
            this.trackDate = trackDate;
            this.trackRemark = trackRemark;
        }
    }

    public static class SysTrackData{
        /** 学生跟踪表 */
        @Field(type = FieldType.Keyword)
        private Long id;

        /** 班级 */
        @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
        private String className;

        /** 学生 */
        @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
        private String studentName;

        /** 跟踪日期 */
        @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
        @JsonFormat(pattern = "yyyy-MM-dd")
        private Date trackDate;

        /** 追踪备注 */
        @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
        private String trackRemark;

        /** 追踪人 */
        @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
        private String teacherName;

        /** 追踪次数 */
        @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
        private Long trackTimes;

        /** 学生id */
        @Field(type = FieldType.Keyword)
        private Long studentId;

        /** 班级id */
        @Field(type = FieldType.Keyword)
        private Long classId;

        public SysTrackData() {
        }

        public SysTrackData(Long id, String className, String studentName, Date trackDate, String trackRemark, String teacherName, Long trackTimes, Long studentId, Long classId) {
            this.id = id;
            this.className = className;
            this.studentName = studentName;
            this.trackDate = trackDate;
            this.trackRemark = trackRemark;
            this.teacherName = teacherName;
            this.trackTimes = trackTimes;
            this.studentId = studentId;
            this.classId = classId;
        }

        public Long getId() {
            return id;
        }

        public void setId(Long id) {
            this.id = id;
        }

        public String getClassName() {
            return className;
        }

        public void setClassName(String className) {
            this.className = className;
        }

        public String getStudentName() {
            return studentName;
        }

        public void setStudentName(String studentName) {
            this.studentName = studentName;
        }

        public Date getTrackDate() {
            return trackDate;
        }

        public void setTrackDate(Date trackDate) {
            this.trackDate = trackDate;
        }

        public String getTrackRemark() {
            return trackRemark;
        }

        public void setTrackRemark(String trackRemark) {
            this.trackRemark = trackRemark;
        }

        public String getTeacherName() {
            return teacherName;
        }

        public void setTeacherName(String teacherName) {
            this.teacherName = teacherName;
        }

        public Long getTrackTimes() {
            return trackTimes;
        }

        public void setTrackTimes(Long trackTimes) {
            this.trackTimes = trackTimes;
        }

        public Long getStudentId() {
            return studentId;
        }

        public void setStudentId(Long studentId) {
            this.studentId = studentId;
        }

        public Long getClassId() {
            return classId;
        }

        public void setClassId(Long classId) {
            this.classId = classId;
        }
    }

    public static class AcademyTrackingData{
        /** 潜在客户ID */
        @Field(type = FieldType.Keyword)
        private Long id;

        /** 姓名 */
        @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
        private String studentName;

        /** 录入人（教师） */
        @Field(type = FieldType.Keyword)
        private String teacherName;

        /** 发生时间 */
        @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
        @JsonFormat(pattern = "yyyy-MM-dd")
        private Date trackDate;

        /** 意向班级 */
        @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
        private String className;

        /** 跟踪次数 */
        @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
        private Long traceTimes;
        /**
         * 备注
         */
        @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
        private String trackRemark;



        public Long getId() {
            return id;
        }

        public void setId(Long id) {
            this.id = id;
        }

        public String getStudentName() {
            return studentName;
        }

        public void setStudentName(String studentName) {
            this.studentName = studentName;
        }

        public String getTeacherName() {
            return teacherName;
        }

        public void setTeacherName(String teacherName) {
            this.teacherName = teacherName;
        }

        public Date getTrackDate() {
            return trackDate;
        }

        public void setTrackDate(Date trackDate) {
            this.trackDate = trackDate;
        }

        public String getClassName() {
            return className;
        }

        public void setClassName(String className) {
            this.className = className;
        }

        public Long getTraceTimes() {
            return traceTimes;
        }

        public void setTraceTimes(Long traceTimes) {
            this.traceTimes = traceTimes;
        }

        public String getTrackRemark() {
            return trackRemark;
        }

        public void setTrackRemark(String trackRemark) {
            this.trackRemark = trackRemark;
        }


        public AcademyTrackingData() {
        }

        public AcademyTrackingData(Long id, String studentName, String teacherName, Date trackDate, String className, Long traceTimes, String trackRemark) {
            this.id = id;
            this.studentName = studentName;
            this.teacherName = teacherName;
            this.trackDate = trackDate;
            this.className = className;
            this.traceTimes = traceTimes;
            this.trackRemark = trackRemark;
        }
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public TeachingTraceData getTeachingTraceData() {
        return teachingTraceData;
    }

    public void setTeachingTraceData(TeachingTraceData teachingTraceData) {
        this.teachingTraceData = teachingTraceData;
    }

    public SysTrackData getSysTrackData() {
        return sysTrackData;
    }

    public void setSysTrackData(SysTrackData sysTrackData) {
        this.sysTrackData = sysTrackData;
    }

    public AcademyTrackingData getAcademyTrackingData() {
        return academyTrackingData;
    }

    public void setAcademyTrackingData(AcademyTrackingData academyTrackingData) {
        this.academyTrackingData = academyTrackingData;
    }

    public MultiParamDto(String id, TeachingTraceData teachingTraceData, SysTrackData sysTrackData, AcademyTrackingData academyTrackingData) {
        this.id = id;
        this.teachingTraceData = teachingTraceData;
        this.sysTrackData = sysTrackData;
        this.academyTrackingData = academyTrackingData;
    }
}
